package com.doctor.ui.office;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.doctor.comm.ConstConfig;
import com.doctor.ui.R;
import com.doctor.ui.office.TodayEventFrag.TodayEventCallback;

public class DrugsInfoFrag extends OfficeBaseFrag{

	/**
	 * 药品信息
	 */
	
	private DrugsInfoCallback callback;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View view=inflater.inflate(R.layout.drugs_info, container, false);
		initiaView(view);
		callback.onDrugsInfo();
		return view;
	}
	
	@Override
	public void onAttach(Activity activity) {
		// TODO Auto-generated method stub
		super.onAttach(activity);
		try {
			callback=(DrugsInfoCallback) activity;
		} catch (ClassCastException e) {
			e.printStackTrace();
		}
	}
	
	@Override
	public void onDetach() {
		// TODO Auto-generated method stub
		super.onDetach();
		callback=null;
	}
	
	@Override
	protected String getTable() {
		// TODO Auto-generated method stub
		return ConstConfig.DRUGS_INFO_TABLE;
	}
	
	@Override
	protected void setTable(Bundle bundle, String tableName) {
		// TODO Auto-generated method stub
		bundle.putString(ConstConfig.TABLE, ConstConfig.DRUGS_INFO_TABLE);
	}
	
	public interface DrugsInfoCallback{
		public void onDrugsInfo();
	}	
	
	
}
